{include file="public/header" /}





<div class="page">

    <form id="store_form" method="post" enctype="multipart/form-data">
        <table class="ds-default-table">
            <tbody>
                <tr class="noborder">
                    <td class="required w120"><label class="validation" for="contract_name">{$Think.lang.contract_name}:</label></td>
                    <td class="vatop rowform"><input type="text" value="" id="contract_name" name="contract_name" class="txt" /></td>
                    <td class="vatop tips"></td>
                </tr>

                <tr class="noborder">
                    <td class="required"><label class="validation" for="contract_type">{$Think.lang.contract_type}:</label></td>
                    <td class="vatop rowform">
                        <select name="contract_type" id="contract_type">
                            <option value="客户">客户</option>
                            <option value="大客户">大客户</option>
                            <option value="运营商">运营商</option>
                            <option value="供应商">供应商</option>
                        </select>
                    </td>
                    <td class="vatop tips"></td>
                </tr>

                <tr class="noborder">
                    <td class="required"><label class="validation" for="contract_file">{$Think.lang.contract_file}:</label></td>
                    <td class="vatop rowform">
                        <input name="contract_file" id="contract_file" type="file" class="w200" />
                    </td>
                    <td class="vatop tips"></td>
                </tr>

                <tr class="noborder">
                    <td class="required"><label class="validation" for="contract_img">{$Think.lang.contract_img}:</label></td>
                    <td class="vatop rowform">
                        <input name="contract_img" id="contract_img" type="file" class="w200" />
                    </td>
                    <td class="vatop tips"></td>
                </tr>

                <tr class="noborder">
                    <td class="required"><label class="" for="contract_other">{$Think.lang.contract_other}:</label></td>
                    <td class="vatop rowform"><textarea name="contract_other" id="contract_other" cols="30" rows="10"></textarea></td>
                    <td class="vatop tips"></td>
                </tr>


            </tbody>
            <tfoot>
                <tr class="tfoot">
                    <td colspan="15"><input class="btn" type="submit" value="{$Think.lang.ds_submit}"/></td>
                </tr>
            </tfoot>
        </table>
    </form>
</div>
<script type="text/javascript">
    $(function () {
        $('#store_form').validate({
            errorPlacement: function (error, element) {
                error.appendTo(element.parentsUntil('tr').parent().find('td:last'));
            },
            rules: {
                contract_name: {
                    required: true
                },
                contract_file: {
                    required: true
                },
                contract_img: {
                    required: true
                }
            },
            messages: {
                store_name: {
                    required: '{$Think.lang.store_name_required}',
                    remote: '{$Think.lang.store_name_remote}'
                },
                member_name: {
                    required: '{$Think.lang.member_name_required}',
                    minlength: '{$Think.lang.member_name_minlength}',
                    maxlength: '{$Think.lang.member_name_maxlength}',
                    remote: '{$Think.lang.member_name_remote}'
                },
                seller_name: {
                    required: '{$Think.lang.seller_name_required}',
                    minlength: '{$Think.lang.seller_name_minlength}',
                    maxlength: '{$Think.lang.seller_name_maxlength}',
                    remote: '{$Think.lang.seller_name_remote}'
                },
                member_password: {
                    required: '{$Think.lang.member_password_required}',
                    minlength: '{$Think.lang.member_password_minlength}'
                },
                contract_name: {
                    required: '合同名称不能为空'
                },
                contract_file: {
                    required: '合同附件不能为空'
                },
                contract_img: {
                    required: '合同照片不能为空'
                }
            }
        });
    });
</script>
